<?php
header('content-type:text/html; charset=utf-8');
session_start();
@$name=$_REQUEST['name'];
@$shou=$_REQUEST['shou'];

$pdo=new PDO('mysql:dbname=ton;charset=utf8','root');

$s=$pdo->prepare('insert into user(name,shou) values(:aa,:bb)');
if($s->execute(array('aa'=>$name,'bb'=>$shou))){
	header('content-type:text/html; charset=utf-8');
	header('Refresh:2;url=/th2.php');
	print_r("<h3>添加成功</h3>");
}else{
	header('Refresh:2;url=/th3.php');
	print_r("<h3>添加失败</h3>");
}